﻿<sdk:Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewModels="clr-namespace:MedLink2011.Views.ClinicCharts.ViewModels" 
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Data" 
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:E2C="clr-namespace:MedLink2011.Core"
xmlns:appControls="clr-namespace:MedLink2011.Controls"
xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
x:Class="MedLink2011.Views.ClinicCharts.WorkWithGrid.ClinicChartsWorkWithGrid"
mc:Ignorable="d"
d:DesignWidth="840" d:DesignHeight="480"

Title="Clinic Charts Grid"
>
    <sdk:Page.Resources>
        <viewModels:ClinicChartViewModel x:Key="ClinicChartViewModel" />
    </sdk:Page.Resources>
        <appControls:BusyIndicator x:Name="BusyIndicator" BusyContent="Loading ClinicChart data...." DataContext="{Binding Source={StaticResource ClinicChartViewModel}}" FontSize="18" Foreground="DarkGray" IsBusy="{Binding IsBusy}">
        <ScrollViewer x:Name="scrollViewerClinicCharts" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" >
    <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource ClinicChartViewModel}}" Background="#FF8D8C89" >
    <Grid.RowDefinitions>
        <RowDefinition Height="40" />
            <RowDefinition Height="300*" />
         </Grid.RowDefinitions>
        <Grid.ColumnDefinitions >
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="230*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Column="0" Grid.Row="0" Height="34" HorizontalAlignment="Left" Orientation="Horizontal" VerticalAlignment="Top" Width="Auto">
            <Button  Background="#FF62A3DB" x:Name="printListButton" Content="Imprimir Lista"  Margin="2"   Height="30" FontSize="11" Click="printListButton_Click"  />
            <Button  Background="#FF62A3DB" x:Name="printButton" Content="Imprimir Seleccionado"  Margin="2"  Height="30" FontSize="11" Command="{Binding PrintClinicChartCommand}"  />
            <Button Background="#FF62A3DB" x:Name="addButton" Content="Agregar Nuevo" Margin="2"   Height="30" FontSize="11" Command="{Binding AddNewClinicChartCommand}" />
            <Button  Background="#FF62A3DB" x:Name="EditCurrentInNewWindowButton" Content="Editar Seleccionado"  Margin="2"   Height="30" FontSize="11" Click="EditCurrentInNewWindowButton_Click"  />
            <Button Background="#FF62A3DB"  x:Name="deleteButton" Content="Eliminar Seleccionado" Margin="2"   Height="30" FontSize="11" Command="{Binding DeleteClinicChartCommand}" />
            <Button Background="#FF62A3DB"  x:Name="Export2ExcelButton" Content="Exportar a Excel" Margin="2"   Height="30" FontSize="11" Click="Export2ExcelButton_Click" />
        </StackPanel>
                        <ScrollViewer Grid.Column="1" Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" >
                    <StackPanel   HorizontalAlignment="Left" Orientation="Vertical" VerticalAlignment="Top"  Margin="2">
                    <!--<Button  x:Name="ShowAppointmentsButton" Content="Citas" Width="200" Margin="2"   Height="30" FontSize="11" Command="{Binding ShowChartDashboardCommand}" CommandParameter="{Binding SelectedItem, ElementName=PatientDataGridTelerik}" />-->
                    <Button Background="#FF6BB6F7" x:Name="ShowEvaluation_CardiosButton" Content="Evaluation Cardios" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToEvaluation_CardiosButtonClick"  />
                    <Button Background="#FF6BB6F7" x:Name="ShowEvaluation_ConstitutionalsButton" Content="Evaluation Constitutionals" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToEvaluation_ConstitutionalsButtonClick"  />
                    <Button Background="#FF6BB6F7" x:Name="ShowEvaluation_EntsButton" Content="Evaluation Ents" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToEvaluation_EntsButtonClick"  />
                    <Button Background="#FF6BB6F7" x:Name="ShowEvaluation_ExtremsButton" Content="Evaluation Extrems" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToEvaluation_ExtremsButtonClick"  />
                    <Button Background="#FF6BB6F7" x:Name="ShowEvaluation_GastrosButton" Content="Evaluation Gastros" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToEvaluation_GastrosButtonClick"  />
                    <Button Background="#FF6BB6F7" x:Name="ShowEvaluation_LymphsButton" Content="Evaluation Lymphs" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToEvaluation_LymphsButtonClick"  />
                    <Button Background="#FF6BB6F7" x:Name="ShowEvaluation_MuscsButton" Content="Evaluation Muscs" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToEvaluation_MuscsButtonClick"  />
                    <Button Background="#FF6BB6F7" x:Name="ShowEvaluation_NecksButton" Content="Evaluation Necks" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToEvaluation_NecksButtonClick"  />
                    <Button Background="#FF6BB6F7" x:Name="ShowEvaluation_NeurosButton" Content="Evaluation Neuros" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToEvaluation_NeurosButtonClick"  />
                    <Button Background="#FF6BB6F7" x:Name="ShowEvaluation_RespisButton" Content="Evaluation Respis" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToEvaluation_RespisButtonClick"  />
                    <Button Background="#FF6BB6F7" x:Name="ShowEvaluation_SkinsButton" Content="Evaluation Skins" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToEvaluation_SkinsButtonClick"  />
                    <Button Background="#FF6BB6F7" x:Name="ShowHereditary_IllnesButton" Content="Hereditary Illnes" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToHereditary_IllnesButtonClick"  />
                    <Button Background="#FF6290CE" x:Name="ShowClinicChartsButton" Content="Clinic Charts" Width="200" Margin="2"   Height="30" FontSize="11" Click="GoToClinicChartsButtonClick" />
                </StackPanel>
                </ScrollViewer>
<StackPanel Grid.Column="0" Grid.Row="1" Orientation="Vertical" VerticalAlignment="Top" Width="Auto">

<Controls:RadDataPager telerik1:StyleManager.Theme="Windows7" Height="33" x:Name="ClinicChartDataPager" PageSize="24" Margin="1,-5,1,1"  Source="{Binding Items, ElementName=ClinicChartDataGridTelerik}" DisplayMode="FirstLastPreviousNext" AutoEllipsisMode="Both" NumericButtonCount="0" IsTotalItemCountFixed="True" Style="{StaticResource RadDataPagerStyle1}"/>
<telerik:RadGridView telerik1:StyleManager.Theme="Windows7" d:LayoutOverrides="Height" ElementExporting="ClinicChartDataGridTelerik_ElementExporting" IsFilteringAllowed="True"    ShowColumnHeaders="True" ShowColumnFooters="False" ShowGroupPanel="True"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch"   AutoGenerateColumns="False" DataContext="{Binding Source={StaticResource ClinicChartViewModel}}" ItemsSource="{Binding ClinicChartCollection, Mode=TwoWay}" x:Name="ClinicChartDataGridTelerik" Style="{StaticResource  RadGridViewStyle1}"   >
                             <i:Interaction.Triggers>
                               <i:EventTrigger EventName="SelectionChanged">
                                    <E2C:EventToCommand Command="{Binding SelectionChangedCommand}" PassEventArgsToCommand="True"  ></E2C:EventToCommand>
                                </i:EventTrigger>
                                <i:EventTrigger EventName="RowLoaded">
                                    <E2C:EventToCommand Command="{Binding RowLoadedCommand}" PassEventArgsToCommand="True"  ></E2C:EventToCommand>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                            <telerik:RadGridView.Columns >
<telerik:GridViewDataColumn HeaderCellStyle="{StaticResource myCustomHeaderStyle}" x:Name="ClinicChart_IdColumn" DataMemberBinding="{Binding ClinicChart_Id}" Header="Clinic Chart Id" Width="25" />
<telerik:GridViewDataColumn HeaderCellStyle="{StaticResource myCustomHeaderStyle}"  x:Name="Clinic_Chart_DescriptionColumn" DataMemberBinding="{Binding Clinic_Chart_Description}" Header="Clinic Chart Description" Width="SizeToHeader" />
<telerik:GridViewDataColumn HeaderCellStyle="{StaticResource myCustomHeaderStyle}"  x:Name="Clinic_Chart_Extra_infoColumn" DataMemberBinding="{Binding Clinic_Chart_Extra_info}" Header="Clinic Chart Extra Info" Width="SizeToHeader" />
</telerik:RadGridView.Columns>
                             </telerik:RadGridView>

</StackPanel>
    </Grid>
  </ScrollViewer>
 </appControls:BusyIndicator>
</sdk:Page>

